{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 导入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171\n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142\n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118\n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110\n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# data = pd.read_csv(open('G:/我的视频录制/爬虫+数据分析课程/猫眼电影爬虫及分析/maoyan.csv',encoding='utf-8'))\n",
    "# data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>泰坦尼克号</td>\n",
       "      <td>莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩</td>\n",
       "      <td>1998-04-03</td>\n",
       "      <td>9.5</td>\n",
       "      <td>历史,爱情,灾难</td>\n",
       "      <td>194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>唐伯虎点秋香</td>\n",
       "      <td>周星驰,巩俐,郑佩佩</td>\n",
       "      <td>1993-07-01(中国香港)</td>\n",
       "      <td>9.2</td>\n",
       "      <td>喜剧,爱情,古装</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>千与千寻</td>\n",
       "      <td>柊瑠美,入野自由,夏木真理</td>\n",
       "      <td>2001-07-20(日本)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>动画,奇幻,冒险</td>\n",
       "      <td>125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>魂断蓝桥</td>\n",
       "      <td>费雯·丽,罗伯特·泰勒,露塞尔·沃特森</td>\n",
       "      <td>1940-05-17(美国)</td>\n",
       "      <td>9.2</td>\n",
       "      <td>剧情,战争,爱情</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>乱世佳人</td>\n",
       "      <td>费雯·丽,克拉克·盖博,奥利维娅·德哈维兰</td>\n",
       "      <td>1939-12-15(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>剧情,爱情,战争</td>\n",
       "      <td>238</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                    author          pub_time  star     style  \\\n",
       "0     霸王别姬                张国荣,张丰毅,巩俐        1993-01-01   9.6     爱情,剧情   \n",
       "1   肖申克的救赎       蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿    1994-10-14(美国)   9.5     犯罪,剧情   \n",
       "2     罗马假日     格利高里·派克,奥黛丽·赫本,埃迪·艾伯特    1953-09-02(美国)   9.1  喜剧,剧情,爱情   \n",
       "3  这个杀手不太冷       让·雷诺,加里·奥德曼,娜塔莉·波特曼    1994-09-14(法国)   9.5  剧情,惊悚,犯罪   \n",
       "4       教父      马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩    1972-03-24(美国)   9.3  犯罪,剧情,惊悚   \n",
       "5    泰坦尼克号  莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩        1998-04-03   9.5  历史,爱情,灾难   \n",
       "6   唐伯虎点秋香                周星驰,巩俐,郑佩佩  1993-07-01(中国香港)   9.2  喜剧,爱情,古装   \n",
       "7     千与千寻             柊瑠美,入野自由,夏木真理    2001-07-20(日本)   9.3  动画,奇幻,冒险   \n",
       "8     魂断蓝桥       费雯·丽,罗伯特·泰勒,露塞尔·沃特森    1940-05-17(美国)   9.2  剧情,战争,爱情   \n",
       "9     乱世佳人     费雯·丽,克拉克·盖博,奥利维娅·德哈维兰    1939-12-15(美国)   9.1  剧情,爱情,战争   \n",
       "\n",
       "   long_time  \n",
       "0        171  \n",
       "1        142  \n",
       "2        118  \n",
       "3        110  \n",
       "4        175  \n",
       "5        194  \n",
       "6        102  \n",
       "7        125  \n",
       "8        108  \n",
       "9        238  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_csv('maoyan.csv',encoding='utf-8')\n",
    "data.head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 简单分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 100 entries, 0 to 99\n",
      "Data columns (total 6 columns):\n",
      "title        100 non-null object\n",
      "author       100 non-null object\n",
      "pub_time     100 non-null object\n",
      "star         100 non-null float64\n",
      "style        100 non-null object\n",
      "long_time    100 non-null int64\n",
      "dtypes: float64(1), int64(1), object(4)\n",
      "memory usage: 4.8+ KB\n"
     ]
    }
   ],
   "source": [
    "data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>star</th>\n",
       "      <th>long_time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>100.000000</td>\n",
       "      <td>100.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>9.033000</td>\n",
       "      <td>127.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.199522</td>\n",
       "      <td>34.210689</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>8.800000</td>\n",
       "      <td>45.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>8.900000</td>\n",
       "      <td>99.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>9.000000</td>\n",
       "      <td>124.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>9.200000</td>\n",
       "      <td>148.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>9.600000</td>\n",
       "      <td>238.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             star   long_time\n",
       "count  100.000000  100.000000\n",
       "mean     9.033000  127.750000\n",
       "std      0.199522   34.210689\n",
       "min      8.800000   45.000000\n",
       "25%      8.900000   99.500000\n",
       "50%      9.000000  124.000000\n",
       "75%      9.200000  148.500000\n",
       "max      9.600000  238.000000"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9.032999999999996"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['star'].mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 选取行和列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171\n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142\n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118\n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110\n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0                                  张国荣,张丰毅,巩俐\n",
       "1                         蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿\n",
       "2                       格利高里·派克,奥黛丽·赫本,埃迪·艾伯特\n",
       "3                         让·雷诺,加里·奥德曼,娜塔莉·波特曼\n",
       "4                        马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩\n",
       "5                    莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩\n",
       "6                                  周星驰,巩俐,郑佩佩\n",
       "7                               柊瑠美,入野自由,夏木真理\n",
       "8                         费雯·丽,罗伯特·泰勒,露塞尔·沃特森\n",
       "9                       费雯·丽,克拉克·盖博,奥利维娅·德哈维兰\n",
       "10                             寺田农,鹫尾真知子,龟山助清\n",
       "11                                周星驰,莫文蔚,张柏芝\n",
       "12                        连姆·尼森,拉尔夫·费因斯,本·金斯利\n",
       "13                                 邱岳峰,毕克,富润生\n",
       "14                   朱莉·安德鲁斯,克里斯托弗·普卢默,埃琳诺·帕克\n",
       "15                       约翰尼·德普,薇诺娜·瑞德,黛安·韦斯特\n",
       "16                                 张国荣,梁朝伟,张震\n",
       "17                  罗伯托·贝尼尼,尼可莱塔·布拉斯基,乔治·坎塔里尼\n",
       "18                      蒂姆·罗斯,普路特·泰勒·文斯,比尔·努恩\n",
       "19                    基努·里维斯,凯瑞-安·莫斯,劳伦斯·菲什伯恩\n",
       "20                      约翰尼·德普,凯拉·奈特莉,奥兰多·布鲁姆\n",
       "21                       伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒\n",
       "22                   丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃特森\n",
       "23                                刘德华,梁朝伟,黄秋生\n",
       "24                                张国荣,梁朝伟,张学友\n",
       "25                         金·凯瑞,劳拉·琳妮,诺亚·艾默里奇\n",
       "26                     克里斯蒂安·贝尔,希斯·莱杰,阿伦·伊克哈特\n",
       "27                       阿尔·帕西诺,罗伯特·德尼罗,黛安·基顿\n",
       "28                       伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒\n",
       "29                        本·贝尔特,艾丽莎·奈特,杰夫·格尔林\n",
       "                       ...                   \n",
       "70                        弗朗索瓦·克鲁塞,奥玛·希,安娜·勒尼\n",
       "71                                 孔刘,郑有美,金智英\n",
       "72              马里奥·毛瑞尔,平采娜·乐维瑟派布恩,阿查拉那·阿瑞亚卫考\n",
       "73                                 周星驰,朱茵,莫文蔚\n",
       "74                                张曼玉,梁家辉,甄子丹\n",
       "75                                 黎明,张曼玉,曾志伟\n",
       "76                                 李来,薛耿求,严志媛\n",
       "77    默罕默德·阿米尔·纳吉,Kamal Mirkarimi,Behzad Rafi\n",
       "78                             内山昂辉,佐仓绫音,后藤弘树\n",
       "79                    瑞秋·麦克亚当斯,多姆纳尔·格里森,比尔·奈伊\n",
       "80                     阿沙·巴特菲尔德,维拉·法梅加,大卫·休里斯\n",
       "81                   乌尔里希·穆埃,塞巴斯蒂安·科赫,马蒂娜·格德克\n",
       "82                             志田未来,神木隆之介,大竹忍\n",
       "83                                河正宇,李璟荣,李大为\n",
       "84                                柳承龙,郑镇荣,朴信惠\n",
       "85                       里克·奥巴瑞,路易·西霍尤斯,哈迪·琼斯\n",
       "86                            仲代达矢,春川真澄,井川比佐志\n",
       "87              亚历桑德雷·罗德里格斯,艾莉丝·布拉加,莱安德鲁·菲尔米诺\n",
       "88                                宋康昊,郭度沅,吴达洙\n",
       "89                               三船敏郎,志村乔,千秋实\n",
       "90                                 狄龙,张国荣,周润发\n",
       "91                                吴念真,金燕玲,李凯莉\n",
       "92                   凯文·科斯特纳,克林特·伊斯特伍德,T·J·劳瑟\n",
       "93                           雅克·贝汉,姜文,兰斯洛特·佩林\n",
       "94                                俞承豪,金艺芬,童孝熙\n",
       "95                   克林特·伊斯特伍德,李·范·克里夫,埃里·瓦拉赫\n",
       "96                                宋在浩,李顺才,尹秀晶\n",
       "97                       雅克·贝汉,Philippe Labro\n",
       "98                                张国荣,张曼玉,刘德华\n",
       "99                               秦岚,糸井重里,岛本须美\n",
       "Name: author, Length: 100, dtype: object"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['author']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>author</th>\n",
       "      <th>style</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>爱情,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩</td>\n",
       "      <td>历史,爱情,灾难</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>周星驰,巩俐,郑佩佩</td>\n",
       "      <td>喜剧,爱情,古装</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>柊瑠美,入野自由,夏木真理</td>\n",
       "      <td>动画,奇幻,冒险</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>费雯·丽,罗伯特·泰勒,露塞尔·沃特森</td>\n",
       "      <td>剧情,战争,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>费雯·丽,克拉克·盖博,奥利维娅·德哈维兰</td>\n",
       "      <td>剧情,爱情,战争</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>寺田农,鹫尾真知子,龟山助清</td>\n",
       "      <td>动画,冒险,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>周星驰,莫文蔚,张柏芝</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>连姆·尼森,拉尔夫·费因斯,本·金斯利</td>\n",
       "      <td>剧情,历史,战争</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>邱岳峰,毕克,富润生</td>\n",
       "      <td>动画,奇幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>朱莉·安德鲁斯,克里斯托弗·普卢默,埃琳诺·帕克</td>\n",
       "      <td>爱情,歌舞,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>约翰尼·德普,薇诺娜·瑞德,黛安·韦斯特</td>\n",
       "      <td>爱情,奇幻,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>张国荣,梁朝伟,张震</td>\n",
       "      <td>剧情,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>罗伯托·贝尼尼,尼可莱塔·布拉斯基,乔治·坎塔里尼</td>\n",
       "      <td>战争,剧情,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>蒂姆·罗斯,普路特·泰勒·文斯,比尔·努恩</td>\n",
       "      <td>剧情,爱情,音乐</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>基努·里维斯,凯瑞-安·莫斯,劳伦斯·菲什伯恩</td>\n",
       "      <td>动作,科幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>约翰尼·德普,凯拉·奈特莉,奥兰多·布鲁姆</td>\n",
       "      <td>动作,冒险,奇幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒</td>\n",
       "      <td>动作,冒险,奇幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃特森</td>\n",
       "      <td>冒险,奇幻,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>刘德华,梁朝伟,黄秋生</td>\n",
       "      <td>犯罪,悬疑,惊悚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>张国荣,梁朝伟,张学友</td>\n",
       "      <td>喜剧,古装,武侠</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>金·凯瑞,劳拉·琳妮,诺亚·艾默里奇</td>\n",
       "      <td>剧情,喜剧,科幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>克里斯蒂安·贝尔,希斯·莱杰,阿伦·伊克哈特</td>\n",
       "      <td>动作,科幻,惊悚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>阿尔·帕西诺,罗伯特·德尼罗,黛安·基顿</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒</td>\n",
       "      <td>动作,冒险,奇幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>本·贝尔特,艾丽莎·奈特,杰夫·格尔林</td>\n",
       "      <td>喜剧,科幻,动画</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>弗朗索瓦·克鲁塞,奥玛·希,安娜·勒尼</td>\n",
       "      <td>传记,喜剧,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>孔刘,郑有美,金智英</td>\n",
       "      <td>剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>马里奥·毛瑞尔,平采娜·乐维瑟派布恩,阿查拉那·阿瑞亚卫考</td>\n",
       "      <td>喜剧,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>周星驰,朱茵,莫文蔚</td>\n",
       "      <td>喜剧,爱情,奇幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>张曼玉,梁家辉,甄子丹</td>\n",
       "      <td>动作,古装,武侠</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75</th>\n",
       "      <td>黎明,张曼玉,曾志伟</td>\n",
       "      <td>剧情,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>李来,薛耿求,严志媛</td>\n",
       "      <td>剧情,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>默罕默德·阿米尔·纳吉,Kamal Mirkarimi,Behzad Rafi</td>\n",
       "      <td>剧情,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>内山昂辉,佐仓绫音,后藤弘树</td>\n",
       "      <td>动画,奇幻,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>瑞秋·麦克亚当斯,多姆纳尔·格里森,比尔·奈伊</td>\n",
       "      <td>爱情,剧情,科幻</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>阿沙·巴特菲尔德,维拉·法梅加,大卫·休里斯</td>\n",
       "      <td>剧情,战争</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>乌尔里希·穆埃,塞巴斯蒂安·科赫,马蒂娜·格德克</td>\n",
       "      <td>剧情,悬疑</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>82</th>\n",
       "      <td>志田未来,神木隆之介,大竹忍</td>\n",
       "      <td>动画,奇幻,冒险</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>河正宇,李璟荣,李大为</td>\n",
       "      <td>动作,悬疑,犯罪</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>柳承龙,郑镇荣,朴信惠</td>\n",
       "      <td>剧情,喜剧,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>里克·奥巴瑞,路易·西霍尤斯,哈迪·琼斯</td>\n",
       "      <td>纪录片</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>仲代达矢,春川真澄,井川比佐志</td>\n",
       "      <td>剧情,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>亚历桑德雷·罗德里格斯,艾莉丝·布拉加,莱安德鲁·菲尔米诺</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88</th>\n",
       "      <td>宋康昊,郭度沅,吴达洙</td>\n",
       "      <td>剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>三船敏郎,志村乔,千秋实</td>\n",
       "      <td>动作,冒险,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>狄龙,张国荣,周润发</td>\n",
       "      <td>剧情,动作,犯罪</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>吴念真,金燕玲,李凯莉</td>\n",
       "      <td>爱情,家庭,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>凯文·科斯特纳,克林特·伊斯特伍德,T·J·劳瑟</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>雅克·贝汉,姜文,兰斯洛特·佩林</td>\n",
       "      <td>纪录片</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>俞承豪,金艺芬,童孝熙</td>\n",
       "      <td>剧情,家庭</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>克林特·伊斯特伍德,李·范·克里夫,埃里·瓦拉赫</td>\n",
       "      <td>冒险,西部</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>宋在浩,李顺才,尹秀晶</td>\n",
       "      <td>爱情,剧情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>雅克·贝汉,Philippe Labro</td>\n",
       "      <td>纪录片</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>张国荣,张曼玉,刘德华</td>\n",
       "      <td>剧情,爱情,犯罪</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>秦岚,糸井重里,岛本须美</td>\n",
       "      <td>动画,冒险,奇幻,家庭</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                     author        style\n",
       "0                                张国荣,张丰毅,巩俐        爱情,剧情\n",
       "1                       蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿        犯罪,剧情\n",
       "2                     格利高里·派克,奥黛丽·赫本,埃迪·艾伯特     喜剧,剧情,爱情\n",
       "3                       让·雷诺,加里·奥德曼,娜塔莉·波特曼     剧情,惊悚,犯罪\n",
       "4                      马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩     犯罪,剧情,惊悚\n",
       "5                  莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩     历史,爱情,灾难\n",
       "6                                周星驰,巩俐,郑佩佩     喜剧,爱情,古装\n",
       "7                             柊瑠美,入野自由,夏木真理     动画,奇幻,冒险\n",
       "8                       费雯·丽,罗伯特·泰勒,露塞尔·沃特森     剧情,战争,爱情\n",
       "9                     费雯·丽,克拉克·盖博,奥利维娅·德哈维兰     剧情,爱情,战争\n",
       "10                           寺田农,鹫尾真知子,龟山助清     动画,冒险,家庭\n",
       "11                              周星驰,莫文蔚,张柏芝     喜剧,剧情,爱情\n",
       "12                      连姆·尼森,拉尔夫·费因斯,本·金斯利     剧情,历史,战争\n",
       "13                               邱岳峰,毕克,富润生        动画,奇幻\n",
       "14                 朱莉·安德鲁斯,克里斯托弗·普卢默,埃琳诺·帕克     爱情,歌舞,家庭\n",
       "15                     约翰尼·德普,薇诺娜·瑞德,黛安·韦斯特     爱情,奇幻,剧情\n",
       "16                               张国荣,梁朝伟,张震        剧情,爱情\n",
       "17                罗伯托·贝尼尼,尼可莱塔·布拉斯基,乔治·坎塔里尼     战争,剧情,爱情\n",
       "18                    蒂姆·罗斯,普路特·泰勒·文斯,比尔·努恩     剧情,爱情,音乐\n",
       "19                  基努·里维斯,凯瑞-安·莫斯,劳伦斯·菲什伯恩        动作,科幻\n",
       "20                    约翰尼·德普,凯拉·奈特莉,奥兰多·布鲁姆     动作,冒险,奇幻\n",
       "21                     伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒     动作,冒险,奇幻\n",
       "22                 丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃特森     冒险,奇幻,家庭\n",
       "23                              刘德华,梁朝伟,黄秋生     犯罪,悬疑,惊悚\n",
       "24                              张国荣,梁朝伟,张学友     喜剧,古装,武侠\n",
       "25                       金·凯瑞,劳拉·琳妮,诺亚·艾默里奇     剧情,喜剧,科幻\n",
       "26                   克里斯蒂安·贝尔,希斯·莱杰,阿伦·伊克哈特     动作,科幻,惊悚\n",
       "27                     阿尔·帕西诺,罗伯特·德尼罗,黛安·基顿     剧情,惊悚,犯罪\n",
       "28                     伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒     动作,冒险,奇幻\n",
       "29                      本·贝尔特,艾丽莎·奈特,杰夫·格尔林     喜剧,科幻,动画\n",
       "..                                      ...          ...\n",
       "70                      弗朗索瓦·克鲁塞,奥玛·希,安娜·勒尼     传记,喜剧,剧情\n",
       "71                               孔刘,郑有美,金智英           剧情\n",
       "72            马里奥·毛瑞尔,平采娜·乐维瑟派布恩,阿查拉那·阿瑞亚卫考        喜剧,爱情\n",
       "73                               周星驰,朱茵,莫文蔚     喜剧,爱情,奇幻\n",
       "74                              张曼玉,梁家辉,甄子丹     动作,古装,武侠\n",
       "75                               黎明,张曼玉,曾志伟        剧情,爱情\n",
       "76                               李来,薛耿求,严志媛        剧情,家庭\n",
       "77  默罕默德·阿米尔·纳吉,Kamal Mirkarimi,Behzad Rafi        剧情,家庭\n",
       "78                           内山昂辉,佐仓绫音,后藤弘树     动画,奇幻,剧情\n",
       "79                  瑞秋·麦克亚当斯,多姆纳尔·格里森,比尔·奈伊     爱情,剧情,科幻\n",
       "80                   阿沙·巴特菲尔德,维拉·法梅加,大卫·休里斯        剧情,战争\n",
       "81                 乌尔里希·穆埃,塞巴斯蒂安·科赫,马蒂娜·格德克        剧情,悬疑\n",
       "82                           志田未来,神木隆之介,大竹忍     动画,奇幻,冒险\n",
       "83                              河正宇,李璟荣,李大为     动作,悬疑,犯罪\n",
       "84                              柳承龙,郑镇荣,朴信惠     剧情,喜剧,家庭\n",
       "85                     里克·奥巴瑞,路易·西霍尤斯,哈迪·琼斯          纪录片\n",
       "86                          仲代达矢,春川真澄,井川比佐志        剧情,家庭\n",
       "87            亚历桑德雷·罗德里格斯,艾莉丝·布拉加,莱安德鲁·菲尔米诺        犯罪,剧情\n",
       "88                              宋康昊,郭度沅,吴达洙           剧情\n",
       "89                             三船敏郎,志村乔,千秋实     动作,冒险,剧情\n",
       "90                               狄龙,张国荣,周润发     剧情,动作,犯罪\n",
       "91                              吴念真,金燕玲,李凯莉     爱情,家庭,剧情\n",
       "92                 凯文·科斯特纳,克林特·伊斯特伍德,T·J·劳瑟     犯罪,剧情,惊悚\n",
       "93                         雅克·贝汉,姜文,兰斯洛特·佩林          纪录片\n",
       "94                              俞承豪,金艺芬,童孝熙        剧情,家庭\n",
       "95                 克林特·伊斯特伍德,李·范·克里夫,埃里·瓦拉赫        冒险,西部\n",
       "96                              宋在浩,李顺才,尹秀晶        爱情,剧情\n",
       "97                     雅克·贝汉,Philippe Labro          纪录片\n",
       "98                              张国荣,张曼玉,刘德华     剧情,爱情,犯罪\n",
       "99                             秦岚,糸井重里,岛本须美  动画,冒险,奇幻,家庭\n",
       "\n",
       "[100 rows x 2 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[['author','style']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>泰坦尼克号</td>\n",
       "      <td>莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩</td>\n",
       "      <td>1998-04-03</td>\n",
       "      <td>9.5</td>\n",
       "      <td>历史,爱情,灾难</td>\n",
       "      <td>194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>唐伯虎点秋香</td>\n",
       "      <td>周星驰,巩俐,郑佩佩</td>\n",
       "      <td>1993-07-01(中国香港)</td>\n",
       "      <td>9.2</td>\n",
       "      <td>喜剧,爱情,古装</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>千与千寻</td>\n",
       "      <td>柊瑠美,入野自由,夏木真理</td>\n",
       "      <td>2001-07-20(日本)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>动画,奇幻,冒险</td>\n",
       "      <td>125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>魂断蓝桥</td>\n",
       "      <td>费雯·丽,罗伯特·泰勒,露塞尔·沃特森</td>\n",
       "      <td>1940-05-17(美国)</td>\n",
       "      <td>9.2</td>\n",
       "      <td>剧情,战争,爱情</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>乱世佳人</td>\n",
       "      <td>费雯·丽,克拉克·盖博,奥利维娅·德哈维兰</td>\n",
       "      <td>1939-12-15(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>剧情,爱情,战争</td>\n",
       "      <td>238</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                    author          pub_time  star     style  \\\n",
       "0     霸王别姬                张国荣,张丰毅,巩俐        1993-01-01   9.6     爱情,剧情   \n",
       "1   肖申克的救赎       蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿    1994-10-14(美国)   9.5     犯罪,剧情   \n",
       "2     罗马假日     格利高里·派克,奥黛丽·赫本,埃迪·艾伯特    1953-09-02(美国)   9.1  喜剧,剧情,爱情   \n",
       "3  这个杀手不太冷       让·雷诺,加里·奥德曼,娜塔莉·波特曼    1994-09-14(法国)   9.5  剧情,惊悚,犯罪   \n",
       "4       教父      马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩    1972-03-24(美国)   9.3  犯罪,剧情,惊悚   \n",
       "5    泰坦尼克号  莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩        1998-04-03   9.5  历史,爱情,灾难   \n",
       "6   唐伯虎点秋香                周星驰,巩俐,郑佩佩  1993-07-01(中国香港)   9.2  喜剧,爱情,古装   \n",
       "7     千与千寻             柊瑠美,入野自由,夏木真理    2001-07-20(日本)   9.3  动画,奇幻,冒险   \n",
       "8     魂断蓝桥       费雯·丽,罗伯特·泰勒,露塞尔·沃特森    1940-05-17(美国)   9.2  剧情,战争,爱情   \n",
       "9     乱世佳人     费雯·丽,克拉克·盖博,奥利维娅·德哈维兰    1939-12-15(美国)   9.1  剧情,爱情,战争   \n",
       "\n",
       "   long_time  \n",
       "0        171  \n",
       "1        142  \n",
       "2        118  \n",
       "3        110  \n",
       "4        175  \n",
       "5        194  \n",
       "6        102  \n",
       "7        125  \n",
       "8        108  \n",
       "9        238  "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[0:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1994-09-14(法国)'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.iloc[3,2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pub_time</th>\n",
       "      <th>style</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         pub_time     style\n",
       "2  1953-09-02(美国)  喜剧,剧情,爱情\n",
       "3  1994-09-14(法国)  剧情,惊悚,犯罪"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.iloc[2:4,[2,4]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 年月份分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171\n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142\n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118\n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110\n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "data['year'] = data['pub_time'].str.split('-').str[0]\n",
    "data['month'] = data['pub_time'].str.split('-').str[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "      <td>1993</td>\n",
       "      <td>01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "      <td>1994</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "      <td>1953</td>\n",
       "      <td>09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "      <td>1994</td>\n",
       "      <td>09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "      <td>1972</td>\n",
       "      <td>03</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time  \\\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171   \n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142   \n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118   \n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110   \n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175   \n",
       "\n",
       "   year month  \n",
       "0  1993    01  \n",
       "1  1994    10  \n",
       "2  1953    09  \n",
       "3  1994    09  \n",
       "4  1972    03  "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "year\n",
       "1939    1\n",
       "1940    1\n",
       "1953    1\n",
       "1954    1\n",
       "1957    1\n",
       "1965    2\n",
       "1966    1\n",
       "1972    1\n",
       "1974    1\n",
       "1975    1\n",
       "1984    1\n",
       "1987    1\n",
       "1988    1\n",
       "1990    1\n",
       "1992    3\n",
       "1993    5\n",
       "1994    5\n",
       "1995    1\n",
       "1997    3\n",
       "1998    4\n",
       "1999    3\n",
       "2000    3\n",
       "2001    3\n",
       "2002    4\n",
       "2003    4\n",
       "2004    3\n",
       "2006    4\n",
       "2008    5\n",
       "2009    2\n",
       "2010    7\n",
       "2011    9\n",
       "2012    5\n",
       "2013    6\n",
       "2014    2\n",
       "2015    1\n",
       "2017    1\n",
       "2018    2\n",
       "Name: year, dtype: int64"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "year = data.groupby('year')['year'].count()\n",
    "year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"122220c4527e48ba8e11ad56ef964c99\" style=\"width:800px;height:400px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_122220c4527e48ba8e11ad56ef964c99 = echarts.init(document.getElementById('122220c4527e48ba8e11ad56ef964c99'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_122220c4527e48ba8e11ad56ef964c99 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u7535\\u5f71\\u5e74\\u4efd\\u5206\\u5e03\\u60c5\\u51b5\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 8634483,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"symbol\": \"emptyCircle\",\n",
       "            \"symbolSize\": 4,\n",
       "            \"smooth\": false,\n",
       "            \"step\": false,\n",
       "            \"showSymbol\": true,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1939\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1940\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1953\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1954\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1965\",\n",
       "                    2.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1966\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1972\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1974\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1975\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\",\n",
       "                    3.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\",\n",
       "                    5.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\",\n",
       "                    5.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\",\n",
       "                    3.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\",\n",
       "                    4.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\",\n",
       "                    3.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\",\n",
       "                    3.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\",\n",
       "                    3.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\",\n",
       "                    4.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\",\n",
       "                    4.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\",\n",
       "                    3.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\",\n",
       "                    4.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\",\n",
       "                    5.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\",\n",
       "                    2.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\",\n",
       "                    7.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\",\n",
       "                    9.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\",\n",
       "                    5.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\",\n",
       "                    6.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\",\n",
       "                    2.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\",\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\",\n",
       "                    2.0\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": false,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"normal\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"type\": \"average\",\n",
       "                        \"name\": \"mean-Value\",\n",
       "                        \"symbol\": \"pin\",\n",
       "                        \"symbolSize\": 50,\n",
       "                        \"label\": {\n",
       "                            \"normal\": {\n",
       "                                \"textStyle\": {\n",
       "                                    \"color\": \"#fff\"\n",
       "                                }\n",
       "                            }\n",
       "                        }\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 8634483\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"animation\": true,\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"boundaryGap\": true,\n",
       "            \"type\": \"category\",\n",
       "            \"splitLine\": {\n",
       "                \"show\": false\n",
       "            },\n",
       "            \"axisLine\": {\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 12\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"1939\",\n",
       "                \"1940\",\n",
       "                \"1953\",\n",
       "                \"1954\",\n",
       "                \"1957\",\n",
       "                \"1965\",\n",
       "                \"1966\",\n",
       "                \"1972\",\n",
       "                \"1974\",\n",
       "                \"1975\",\n",
       "                \"1984\",\n",
       "                \"1987\",\n",
       "                \"1988\",\n",
       "                \"1990\",\n",
       "                \"1992\",\n",
       "                \"1993\",\n",
       "                \"1994\",\n",
       "                \"1995\",\n",
       "                \"1997\",\n",
       "                \"1998\",\n",
       "                \"1999\",\n",
       "                \"2000\",\n",
       "                \"2001\",\n",
       "                \"2002\",\n",
       "                \"2003\",\n",
       "                \"2004\",\n",
       "                \"2006\",\n",
       "                \"2008\",\n",
       "                \"2009\",\n",
       "                \"2010\",\n",
       "                \"2011\",\n",
       "                \"2012\",\n",
       "                \"2013\",\n",
       "                \"2014\",\n",
       "                \"2015\",\n",
       "                \"2017\",\n",
       "                \"2018\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"boundaryGap\": true,\n",
       "            \"type\": \"value\",\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"axisLine\": {\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 12\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_122220c4527e48ba8e11ad56ef964c99.setOption(option_122220c4527e48ba8e11ad56ef964c99);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.line.Line at 0x20fc60b10b8>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Line\n",
    "\n",
    "attr = list(year.index)\n",
    "v = list(year)\n",
    "line = Line(\"电影年份分布情况\")\n",
    "line.add(\"\", attr, v, mark_point=[\"average\"])\n",
    "line"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "month\n",
       "01     8\n",
       "02     6\n",
       "03     6\n",
       "04     7\n",
       "05     7\n",
       "06     4\n",
       "07     9\n",
       "08     7\n",
       "09    11\n",
       "10     8\n",
       "11    11\n",
       "12    14\n",
       "Name: month, dtype: int64"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "month = data.groupby('month')['month'].count()\n",
    "month"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"92e677cc14084c75bdb7303bbc7908b0\" style=\"width:800px;height:400px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_92e677cc14084c75bdb7303bbc7908b0 = echarts.init(document.getElementById('92e677cc14084c75bdb7303bbc7908b0'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_92e677cc14084c75bdb7303bbc7908b0 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 2406426,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"data\": [\n",
       "                8.0,\n",
       "                6.0,\n",
       "                6.0,\n",
       "                7.0,\n",
       "                7.0,\n",
       "                4.0,\n",
       "                9.0,\n",
       "                7.0,\n",
       "                11.0,\n",
       "                8.0,\n",
       "                11.0,\n",
       "                14.0\n",
       "            ],\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": false,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 2406426\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"animation\": true,\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"boundaryGap\": true,\n",
       "            \"type\": \"category\",\n",
       "            \"splitLine\": {\n",
       "                \"show\": false\n",
       "            },\n",
       "            \"axisLine\": {\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 12\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"01\",\n",
       "                \"02\",\n",
       "                \"03\",\n",
       "                \"04\",\n",
       "                \"05\",\n",
       "                \"06\",\n",
       "                \"07\",\n",
       "                \"08\",\n",
       "                \"09\",\n",
       "                \"10\",\n",
       "                \"11\",\n",
       "                \"12\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"boundaryGap\": true,\n",
       "            \"type\": \"value\",\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"axisLine\": {\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 12\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_92e677cc14084c75bdb7303bbc7908b0.setOption(option_92e677cc14084c75bdb7303bbc7908b0);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x20fc60bfb00>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Bar\n",
    "\n",
    "attr = list(month.index)\n",
    "v = list(month)\n",
    "bar = Bar(\"\")\n",
    "bar.add(\"\", attr, v)\n",
    "bar"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 地区"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "      <td>1993</td>\n",
       "      <td>01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "      <td>1994</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "      <td>1953</td>\n",
       "      <td>09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "      <td>1994</td>\n",
       "      <td>09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "      <td>1972</td>\n",
       "      <td>03</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time  \\\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171   \n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142   \n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118   \n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110   \n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175   \n",
       "\n",
       "   year month  \n",
       "0  1993    01  \n",
       "1  1994    10  \n",
       "2  1953    09  \n",
       "3  1994    09  \n",
       "4  1972    03  "
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def get_country(i):\n",
    "    country = i.split('(')\n",
    "    if len(country) == 1:\n",
    "        return '中国'\n",
    "    else:\n",
    "        country_1 = country[1].strip(')')\n",
    "        if country_1 == '中国香港':\n",
    "            return '中国'\n",
    "        elif country_1 == '法国戛纳':\n",
    "            return '法国'\n",
    "        else:\n",
    "            return country_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>country</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "      <td>1993</td>\n",
       "      <td>01</td>\n",
       "      <td>中国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "      <td>1994</td>\n",
       "      <td>10</td>\n",
       "      <td>美国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "      <td>1953</td>\n",
       "      <td>09</td>\n",
       "      <td>美国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "      <td>1994</td>\n",
       "      <td>09</td>\n",
       "      <td>法国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "      <td>1972</td>\n",
       "      <td>03</td>\n",
       "      <td>美国</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time  \\\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171   \n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142   \n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118   \n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110   \n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175   \n",
       "\n",
       "   year month country  \n",
       "0  1993    01      中国  \n",
       "1  1994    10      美国  \n",
       "2  1953    09      美国  \n",
       "3  1994    09      法国  \n",
       "4  1972    03      美国  "
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['country'] = data['pub_time'].map(get_country)\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "country\n",
       "中国     40\n",
       "巴西      1\n",
       "德国      1\n",
       "意大利     4\n",
       "日本      7\n",
       "法国      7\n",
       "美国     30\n",
       "英国      3\n",
       "韩国      7\n",
       "Name: country, dtype: int64"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "country = data.groupby('country')['country'].count()\n",
    "country"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"63a14934de904bcf84b68cd9eb7eecce\" style=\"width:800px;height:400px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_63a14934de904bcf84b68cd9eb7eecce = echarts.init(document.getElementById('63a14934de904bcf84b68cd9eb7eecce'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_63a14934de904bcf84b68cd9eb7eecce = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 5785860,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e2d\\u56fd\",\n",
       "                    \"value\": 40.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5df4\\u897f\",\n",
       "                    \"value\": 1.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5fb7\\u56fd\",\n",
       "                    \"value\": 1.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u610f\\u5927\\u5229\",\n",
       "                    \"value\": 4.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65e5\\u672c\",\n",
       "                    \"value\": 7.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cd5\\u56fd\",\n",
       "                    \"value\": 7.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7f8e\\u56fd\",\n",
       "                    \"value\": 30.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u82f1\\u56fd\",\n",
       "                    \"value\": 3.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u97e9\\u56fd\",\n",
       "                    \"value\": 7.0\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"40%\",\n",
       "                \"75%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"outside\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": \"{b}: {d}%\"\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": \"{b}: {d}%\"\n",
       "                }\n",
       "            },\n",
       "            \"seriesId\": 5785860\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4e2d\\u56fd\",\n",
       "                \"\\u5df4\\u897f\",\n",
       "                \"\\u5fb7\\u56fd\",\n",
       "                \"\\u610f\\u5927\\u5229\",\n",
       "                \"\\u65e5\\u672c\",\n",
       "                \"\\u6cd5\\u56fd\",\n",
       "                \"\\u7f8e\\u56fd\",\n",
       "                \"\\u82f1\\u56fd\",\n",
       "                \"\\u97e9\\u56fd\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"left\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"vertical\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"animation\": true,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_63a14934de904bcf84b68cd9eb7eecce.setOption(option_63a14934de904bcf84b68cd9eb7eecce);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.pie.Pie at 0x20fc617e2e8>"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Pie\n",
    "\n",
    "attr = list(country.index)\n",
    "v1 = list(country)\n",
    "pie = Pie(\"\", title_pos='center')\n",
    "pie.add(\n",
    "    \"\",\n",
    "    attr,\n",
    "    v1,\n",
    "    radius=[40, 75],\n",
    "    label_text_color=None,\n",
    "    is_label_show=True,\n",
    "    legend_orient=\"vertical\",\n",
    "    legend_pos=\"left\",\n",
    ")\n",
    "pie"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 明星上榜"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>star</th>\n",
       "      <th>style</th>\n",
       "      <th>long_time</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>country</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>霸王别姬</td>\n",
       "      <td>张国荣,张丰毅,巩俐</td>\n",
       "      <td>1993-01-01</td>\n",
       "      <td>9.6</td>\n",
       "      <td>爱情,剧情</td>\n",
       "      <td>171</td>\n",
       "      <td>1993</td>\n",
       "      <td>01</td>\n",
       "      <td>中国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>肖申克的救赎</td>\n",
       "      <td>蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿</td>\n",
       "      <td>1994-10-14(美国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>犯罪,剧情</td>\n",
       "      <td>142</td>\n",
       "      <td>1994</td>\n",
       "      <td>10</td>\n",
       "      <td>美国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>罗马假日</td>\n",
       "      <td>格利高里·派克,奥黛丽·赫本,埃迪·艾伯特</td>\n",
       "      <td>1953-09-02(美国)</td>\n",
       "      <td>9.1</td>\n",
       "      <td>喜剧,剧情,爱情</td>\n",
       "      <td>118</td>\n",
       "      <td>1953</td>\n",
       "      <td>09</td>\n",
       "      <td>美国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>这个杀手不太冷</td>\n",
       "      <td>让·雷诺,加里·奥德曼,娜塔莉·波特曼</td>\n",
       "      <td>1994-09-14(法国)</td>\n",
       "      <td>9.5</td>\n",
       "      <td>剧情,惊悚,犯罪</td>\n",
       "      <td>110</td>\n",
       "      <td>1994</td>\n",
       "      <td>09</td>\n",
       "      <td>法国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>教父</td>\n",
       "      <td>马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩</td>\n",
       "      <td>1972-03-24(美国)</td>\n",
       "      <td>9.3</td>\n",
       "      <td>犯罪,剧情,惊悚</td>\n",
       "      <td>175</td>\n",
       "      <td>1972</td>\n",
       "      <td>03</td>\n",
       "      <td>美国</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     title                 author        pub_time  star     style  long_time  \\\n",
       "0     霸王别姬             张国荣,张丰毅,巩俐      1993-01-01   9.6     爱情,剧情        171   \n",
       "1   肖申克的救赎    蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿  1994-10-14(美国)   9.5     犯罪,剧情        142   \n",
       "2     罗马假日  格利高里·派克,奥黛丽·赫本,埃迪·艾伯特  1953-09-02(美国)   9.1  喜剧,剧情,爱情        118   \n",
       "3  这个杀手不太冷    让·雷诺,加里·奥德曼,娜塔莉·波特曼  1994-09-14(法国)   9.5  剧情,惊悚,犯罪        110   \n",
       "4       教父   马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩  1972-03-24(美国)   9.3  犯罪,剧情,惊悚        175   \n",
       "\n",
       "   year month country  \n",
       "0  1993    01      中国  \n",
       "1  1994    10      美国  \n",
       "2  1953    09      美国  \n",
       "3  1994    09      法国  \n",
       "4  1972    03      美国  "
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'张国荣,张丰毅,巩俐,蒂姆·罗宾斯,摩根·弗里曼,鲍勃·冈顿,格利高里·派克,奥黛丽·赫本,埃迪·艾伯特,让·雷诺,加里·奥德曼,娜塔莉·波特曼,马龙·白兰度,阿尔·帕西诺,詹姆斯·肯恩,莱昂纳多·迪卡普里奥,凯特·温丝莱特,比利·赞恩,周星驰,巩俐,郑佩佩,柊瑠美,入野自由,夏木真理,费雯·丽,罗伯特·泰勒,露塞尔·沃特森,费雯·丽,克拉克·盖博,奥利维娅·德哈维兰,寺田农,鹫尾真知子,龟山助清,周星驰,莫文蔚,张柏芝,连姆·尼森,拉尔夫·费因斯,本·金斯利,邱岳峰,毕克,富润生,朱莉·安德鲁斯,克里斯托弗·普卢默,埃琳诺·帕克,约翰尼·德普,薇诺娜·瑞德,黛安·韦斯特,张国荣,梁朝伟,张震,罗伯托·贝尼尼,尼可莱塔·布拉斯基,乔治·坎塔里尼,蒂姆·罗斯,普路特·泰勒·文斯,比尔·努恩,基努·里维斯,凯瑞-安·莫斯,劳伦斯·菲什伯恩,约翰尼·德普,凯拉·奈特莉,奥兰多·布鲁姆,伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒,丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃特森,刘德华,梁朝伟,黄秋生,张国荣,梁朝伟,张学友,金·凯瑞,劳拉·琳妮,诺亚·艾默里奇,克里斯蒂安·贝尔,希斯·莱杰,阿伦·伊克哈特,阿尔·帕西诺,罗伯特·德尼罗,黛安·基顿,伊莱贾·伍德,伊恩·麦克莱恩,丽芙·泰勒,本·贝尔特,艾丽莎·奈特,杰夫·格尔林,菲利浦·诺瓦雷,赛尔乔·卡斯特利托,蒂兹亚娜·罗达托,葛优,巩俐,牛犇,汤姆·汉克斯,马特·达蒙,汤姆·塞兹摩尔,倍赏千惠子,木村拓哉,美轮明宏,萨姆·沃辛顿,佐伊·索尔达娜,米歇尔·罗德里格兹,莱昂纳多·迪卡普里奥,渡边谦,约瑟夫·高登-莱维特,Forest,理查·基尔,琼·艾伦,松田洋治,石田百合子,田中裕子,爱德华·哈里森·诺顿,布拉德·皮特,海伦娜·伯翰·卡特,张国荣,梁朝伟,刘嘉玲,岛本须美,永井一郎,坂本千夏,尼古拉斯·凯奇,艾玛·斯通,瑞安·雷诺兹,娜塔莉·波特曼,雨果·维文,斯蒂芬·瑞,亨利·方达,李·科布,马丁·鲍尔萨姆,热拉尔·朱尼奥,让-巴蒂斯特·莫尼耶,玛丽·布奈尔,阿米尔·汗,黄渤,卡琳娜·卡普,威尔·史密斯,贾登·史密斯,坦迪·牛顿,梅尔·吉布森,苏菲·玛索,帕特里克·麦高汉,基努·里维斯,雨果·维文,凯瑞-安·莫斯,范·迪塞尔,保罗·沃克,道恩·强森,杰伊·巴鲁切尔,杰拉德·巴特勒,亚美莉卡·费雷拉,苏拉·沙玛,伊尔凡·可汗,塔布,史蒂夫·卡瑞尔,杰森·席格尔,拉塞尔·布兰德,阿尔·帕西诺,克里斯·奥唐纳,加布里埃尔·安瓦尔,爱德华·阿斯纳,乔丹·长井,鲍勃·彼德森,周星驰,莫文蔚,吴孟达,杰克·尼科尔森,路易丝·弗莱彻,威尔·萨姆森,玛德琳·卡罗尔,卡兰·麦克奥利菲,艾丹·奎因,希斯·莱杰,杰克·吉伦哈尔,米歇尔·威廉姆斯,罗伯特·德尼罗,詹姆斯·伍兹,伊丽莎白·麦戈文,休·杰克曼,克里斯蒂安·贝尔,迈克尔·凯恩,姜文,姜宏波,陈强,约翰·C·赖利,萨拉·西尔弗曼,简·林奇,罗素·克洛,詹妮弗·康纳利,艾德·哈里斯,克里斯蒂安·贝尔,迈克尔·凯恩,加里·奥德曼,汤姆·克鲁斯,布拉德·皮特,克尔斯滕·邓斯特,张国荣,王祖贤,午马,丹尼尔·雷德克里夫,鲁伯特·格林特,艾玛·沃特森,布拉德·皮特,凯特·布兰切特,塔拉吉·P·汉森,艾德里安·布洛迪,艾米莉娅·福克斯,米哈乌·热布罗夫斯基,弗朗索瓦·克鲁塞,奥玛·希,安娜·勒尼,孔刘,郑有美,金智英,马里奥·毛瑞尔,平采娜·乐维瑟派布恩,阿查拉那·阿瑞亚卫考,周星驰,朱茵,莫文蔚,张曼玉,梁家辉,甄子丹,黎明,张曼玉,曾志伟,李来,薛耿求,严志媛,默罕默德·阿米尔·纳吉,Kamal Mirkarimi,Behzad Rafi,内山昂辉,佐仓绫音,后藤弘树,瑞秋·麦克亚当斯,多姆纳尔·格里森,比尔·奈伊,阿沙·巴特菲尔德,维拉·法梅加,大卫·休里斯,乌尔里希·穆埃,塞巴斯蒂安·科赫,马蒂娜·格德克,志田未来,神木隆之介,大竹忍,河正宇,李璟荣,李大为,柳承龙,郑镇荣,朴信惠,里克·奥巴瑞,路易·西霍尤斯,哈迪·琼斯,仲代达矢,春川真澄,井川比佐志,亚历桑德雷·罗德里格斯,艾莉丝·布拉加,莱安德鲁·菲尔米诺,宋康昊,郭度沅,吴达洙,三船敏郎,志村乔,千秋实,狄龙,张国荣,周润发,吴念真,金燕玲,李凯莉,凯文·科斯特纳,克林特·伊斯特伍德,T·J·劳瑟,雅克·贝汉,姜文,兰斯洛特·佩林,俞承豪,金艺芬,童孝熙,克林特·伊斯特伍德,李·范·克里夫,埃里·瓦拉赫,宋在浩,李顺才,尹秀晶,雅克·贝汉,Philippe Labro,张国荣,张曼玉,刘德华,秦岚,糸井重里,岛本须美,'"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "str = ''\n",
    "for i in range(100):\n",
    "    str = str + data.iloc[i,1] + ','\n",
    "str"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['张国荣',\n",
       " '张丰毅',\n",
       " '巩俐',\n",
       " '蒂姆·罗宾斯',\n",
       " '摩根·弗里曼',\n",
       " '鲍勃·冈顿',\n",
       " '格利高里·派克',\n",
       " '奥黛丽·赫本',\n",
       " '埃迪·艾伯特',\n",
       " '让·雷诺',\n",
       " '加里·奥德曼',\n",
       " '娜塔莉·波特曼',\n",
       " '马龙·白兰度',\n",
       " '阿尔·帕西诺',\n",
       " '詹姆斯·肯恩',\n",
       " '莱昂纳多·迪卡普里奥',\n",
       " '凯特·温丝莱特',\n",
       " '比利·赞恩',\n",
       " '周星驰',\n",
       " '巩俐',\n",
       " '郑佩佩',\n",
       " '柊瑠美',\n",
       " '入野自由',\n",
       " '夏木真理',\n",
       " '费雯·丽',\n",
       " '罗伯特·泰勒',\n",
       " '露塞尔·沃特森',\n",
       " '费雯·丽',\n",
       " '克拉克·盖博',\n",
       " '奥利维娅·德哈维兰',\n",
       " '寺田农',\n",
       " '鹫尾真知子',\n",
       " '龟山助清',\n",
       " '周星驰',\n",
       " '莫文蔚',\n",
       " '张柏芝',\n",
       " '连姆·尼森',\n",
       " '拉尔夫·费因斯',\n",
       " '本·金斯利',\n",
       " '邱岳峰',\n",
       " '毕克',\n",
       " '富润生',\n",
       " '朱莉·安德鲁斯',\n",
       " '克里斯托弗·普卢默',\n",
       " '埃琳诺·帕克',\n",
       " '约翰尼·德普',\n",
       " '薇诺娜·瑞德',\n",
       " '黛安·韦斯特',\n",
       " '张国荣',\n",
       " '梁朝伟',\n",
       " '张震',\n",
       " '罗伯托·贝尼尼',\n",
       " '尼可莱塔·布拉斯基',\n",
       " '乔治·坎塔里尼',\n",
       " '蒂姆·罗斯',\n",
       " '普路特·泰勒·文斯',\n",
       " '比尔·努恩',\n",
       " '基努·里维斯',\n",
       " '凯瑞-安·莫斯',\n",
       " '劳伦斯·菲什伯恩',\n",
       " '约翰尼·德普',\n",
       " '凯拉·奈特莉',\n",
       " '奥兰多·布鲁姆',\n",
       " '伊莱贾·伍德',\n",
       " '伊恩·麦克莱恩',\n",
       " '丽芙·泰勒',\n",
       " '丹尼尔·雷德克里夫',\n",
       " '鲁伯特·格林特',\n",
       " '艾玛·沃特森',\n",
       " '刘德华',\n",
       " '梁朝伟',\n",
       " '黄秋生',\n",
       " '张国荣',\n",
       " '梁朝伟',\n",
       " '张学友',\n",
       " '金·凯瑞',\n",
       " '劳拉·琳妮',\n",
       " '诺亚·艾默里奇',\n",
       " '克里斯蒂安·贝尔',\n",
       " '希斯·莱杰',\n",
       " '阿伦·伊克哈特',\n",
       " '阿尔·帕西诺',\n",
       " '罗伯特·德尼罗',\n",
       " '黛安·基顿',\n",
       " '伊莱贾·伍德',\n",
       " '伊恩·麦克莱恩',\n",
       " '丽芙·泰勒',\n",
       " '本·贝尔特',\n",
       " '艾丽莎·奈特',\n",
       " '杰夫·格尔林',\n",
       " '菲利浦·诺瓦雷',\n",
       " '赛尔乔·卡斯特利托',\n",
       " '蒂兹亚娜·罗达托',\n",
       " '葛优',\n",
       " '巩俐',\n",
       " '牛犇',\n",
       " '汤姆·汉克斯',\n",
       " '马特·达蒙',\n",
       " '汤姆·塞兹摩尔',\n",
       " '倍赏千惠子',\n",
       " '木村拓哉',\n",
       " '美轮明宏',\n",
       " '萨姆·沃辛顿',\n",
       " '佐伊·索尔达娜',\n",
       " '米歇尔·罗德里格兹',\n",
       " '莱昂纳多·迪卡普里奥',\n",
       " '渡边谦',\n",
       " '约瑟夫·高登-莱维特',\n",
       " 'Forest',\n",
       " '理查·基尔',\n",
       " '琼·艾伦',\n",
       " '松田洋治',\n",
       " '石田百合子',\n",
       " '田中裕子',\n",
       " '爱德华·哈里森·诺顿',\n",
       " '布拉德·皮特',\n",
       " '海伦娜·伯翰·卡特',\n",
       " '张国荣',\n",
       " '梁朝伟',\n",
       " '刘嘉玲',\n",
       " '岛本须美',\n",
       " '永井一郎',\n",
       " '坂本千夏',\n",
       " '尼古拉斯·凯奇',\n",
       " '艾玛·斯通',\n",
       " '瑞安·雷诺兹',\n",
       " '娜塔莉·波特曼',\n",
       " '雨果·维文',\n",
       " '斯蒂芬·瑞',\n",
       " '亨利·方达',\n",
       " '李·科布',\n",
       " '马丁·鲍尔萨姆',\n",
       " '热拉尔·朱尼奥',\n",
       " '让-巴蒂斯特·莫尼耶',\n",
       " '玛丽·布奈尔',\n",
       " '阿米尔·汗',\n",
       " '黄渤',\n",
       " '卡琳娜·卡普',\n",
       " '威尔·史密斯',\n",
       " '贾登·史密斯',\n",
       " '坦迪·牛顿',\n",
       " '梅尔·吉布森',\n",
       " '苏菲·玛索',\n",
       " '帕特里克·麦高汉',\n",
       " '基努·里维斯',\n",
       " '雨果·维文',\n",
       " '凯瑞-安·莫斯',\n",
       " '范·迪塞尔',\n",
       " '保罗·沃克',\n",
       " '道恩·强森',\n",
       " '杰伊·巴鲁切尔',\n",
       " '杰拉德·巴特勒',\n",
       " '亚美莉卡·费雷拉',\n",
       " '苏拉·沙玛',\n",
       " '伊尔凡·可汗',\n",
       " '塔布',\n",
       " '史蒂夫·卡瑞尔',\n",
       " '杰森·席格尔',\n",
       " '拉塞尔·布兰德',\n",
       " '阿尔·帕西诺',\n",
       " '克里斯·奥唐纳',\n",
       " '加布里埃尔·安瓦尔',\n",
       " '爱德华·阿斯纳',\n",
       " '乔丹·长井',\n",
       " '鲍勃·彼德森',\n",
       " '周星驰',\n",
       " '莫文蔚',\n",
       " '吴孟达',\n",
       " '杰克·尼科尔森',\n",
       " '路易丝·弗莱彻',\n",
       " '威尔·萨姆森',\n",
       " '玛德琳·卡罗尔',\n",
       " '卡兰·麦克奥利菲',\n",
       " '艾丹·奎因',\n",
       " '希斯·莱杰',\n",
       " '杰克·吉伦哈尔',\n",
       " '米歇尔·威廉姆斯',\n",
       " '罗伯特·德尼罗',\n",
       " '詹姆斯·伍兹',\n",
       " '伊丽莎白·麦戈文',\n",
       " '休·杰克曼',\n",
       " '克里斯蒂安·贝尔',\n",
       " '迈克尔·凯恩',\n",
       " '姜文',\n",
       " '姜宏波',\n",
       " '陈强',\n",
       " '约翰·C·赖利',\n",
       " '萨拉·西尔弗曼',\n",
       " '简·林奇',\n",
       " '罗素·克洛',\n",
       " '詹妮弗·康纳利',\n",
       " '艾德·哈里斯',\n",
       " '克里斯蒂安·贝尔',\n",
       " '迈克尔·凯恩',\n",
       " '加里·奥德曼',\n",
       " '汤姆·克鲁斯',\n",
       " '布拉德·皮特',\n",
       " '克尔斯滕·邓斯特',\n",
       " '张国荣',\n",
       " '王祖贤',\n",
       " '午马',\n",
       " '丹尼尔·雷德克里夫',\n",
       " '鲁伯特·格林特',\n",
       " '艾玛·沃特森',\n",
       " '布拉德·皮特',\n",
       " '凯特·布兰切特',\n",
       " '塔拉吉·P·汉森',\n",
       " '艾德里安·布洛迪',\n",
       " '艾米莉娅·福克斯',\n",
       " '米哈乌·热布罗夫斯基',\n",
       " '弗朗索瓦·克鲁塞',\n",
       " '奥玛·希',\n",
       " '安娜·勒尼',\n",
       " '孔刘',\n",
       " '郑有美',\n",
       " '金智英',\n",
       " '马里奥·毛瑞尔',\n",
       " '平采娜·乐维瑟派布恩',\n",
       " '阿查拉那·阿瑞亚卫考',\n",
       " '周星驰',\n",
       " '朱茵',\n",
       " '莫文蔚',\n",
       " '张曼玉',\n",
       " '梁家辉',\n",
       " '甄子丹',\n",
       " '黎明',\n",
       " '张曼玉',\n",
       " '曾志伟',\n",
       " '李来',\n",
       " '薛耿求',\n",
       " '严志媛',\n",
       " '默罕默德·阿米尔·纳吉',\n",
       " 'Kamal Mirkarimi',\n",
       " 'Behzad Rafi',\n",
       " '内山昂辉',\n",
       " '佐仓绫音',\n",
       " '后藤弘树',\n",
       " '瑞秋·麦克亚当斯',\n",
       " '多姆纳尔·格里森',\n",
       " '比尔·奈伊',\n",
       " '阿沙·巴特菲尔德',\n",
       " '维拉·法梅加',\n",
       " '大卫·休里斯',\n",
       " '乌尔里希·穆埃',\n",
       " '塞巴斯蒂安·科赫',\n",
       " '马蒂娜·格德克',\n",
       " '志田未来',\n",
       " '神木隆之介',\n",
       " '大竹忍',\n",
       " '河正宇',\n",
       " '李璟荣',\n",
       " '李大为',\n",
       " '柳承龙',\n",
       " '郑镇荣',\n",
       " '朴信惠',\n",
       " '里克·奥巴瑞',\n",
       " '路易·西霍尤斯',\n",
       " '哈迪·琼斯',\n",
       " '仲代达矢',\n",
       " '春川真澄',\n",
       " '井川比佐志',\n",
       " '亚历桑德雷·罗德里格斯',\n",
       " '艾莉丝·布拉加',\n",
       " '莱安德鲁·菲尔米诺',\n",
       " '宋康昊',\n",
       " '郭度沅',\n",
       " '吴达洙',\n",
       " '三船敏郎',\n",
       " '志村乔',\n",
       " '千秋实',\n",
       " '狄龙',\n",
       " '张国荣',\n",
       " '周润发',\n",
       " '吴念真',\n",
       " '金燕玲',\n",
       " '李凯莉',\n",
       " '凯文·科斯特纳',\n",
       " '克林特·伊斯特伍德',\n",
       " 'T·J·劳瑟',\n",
       " '雅克·贝汉',\n",
       " '姜文',\n",
       " '兰斯洛特·佩林',\n",
       " '俞承豪',\n",
       " '金艺芬',\n",
       " '童孝熙',\n",
       " '克林特·伊斯特伍德',\n",
       " '李·范·克里夫',\n",
       " '埃里·瓦拉赫',\n",
       " '宋在浩',\n",
       " '李顺才',\n",
       " '尹秀晶',\n",
       " '雅克·贝汉',\n",
       " 'Philippe Labro',\n",
       " '张国荣',\n",
       " '张曼玉',\n",
       " '刘德华',\n",
       " '秦岚',\n",
       " '糸井重里',\n",
       " '岛本须美',\n",
       " '']"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "author = str.split(',')\n",
    "author"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Counter({'': 1,\n",
       "         'Behzad Rafi': 1,\n",
       "         'Forest': 1,\n",
       "         'Kamal Mirkarimi': 1,\n",
       "         'Philippe Labro': 1,\n",
       "         'T·J·劳瑟': 1,\n",
       "         '三船敏郎': 1,\n",
       "         '严志媛': 1,\n",
       "         '丹尼尔·雷德克里夫': 2,\n",
       "         '丽芙·泰勒': 2,\n",
       "         '乌尔里希·穆埃': 1,\n",
       "         '乔丹·长井': 1,\n",
       "         '乔治·坎塔里尼': 1,\n",
       "         '井川比佐志': 1,\n",
       "         '亚历桑德雷·罗德里格斯': 1,\n",
       "         '亚美莉卡·费雷拉': 1,\n",
       "         '亨利·方达': 1,\n",
       "         '仲代达矢': 1,\n",
       "         '伊丽莎白·麦戈文': 1,\n",
       "         '伊尔凡·可汗': 1,\n",
       "         '伊恩·麦克莱恩': 2,\n",
       "         '伊莱贾·伍德': 2,\n",
       "         '休·杰克曼': 1,\n",
       "         '佐仓绫音': 1,\n",
       "         '佐伊·索尔达娜': 1,\n",
       "         '保罗·沃克': 1,\n",
       "         '俞承豪': 1,\n",
       "         '倍赏千惠子': 1,\n",
       "         '克尔斯滕·邓斯特': 1,\n",
       "         '克拉克·盖博': 1,\n",
       "         '克林特·伊斯特伍德': 2,\n",
       "         '克里斯·奥唐纳': 1,\n",
       "         '克里斯托弗·普卢默': 1,\n",
       "         '克里斯蒂安·贝尔': 3,\n",
       "         '入野自由': 1,\n",
       "         '兰斯洛特·佩林': 1,\n",
       "         '内山昂辉': 1,\n",
       "         '凯拉·奈特莉': 1,\n",
       "         '凯文·科斯特纳': 1,\n",
       "         '凯特·布兰切特': 1,\n",
       "         '凯特·温丝莱特': 1,\n",
       "         '凯瑞-安·莫斯': 2,\n",
       "         '刘嘉玲': 1,\n",
       "         '刘德华': 2,\n",
       "         '加布里埃尔·安瓦尔': 1,\n",
       "         '加里·奥德曼': 2,\n",
       "         '劳伦斯·菲什伯恩': 1,\n",
       "         '劳拉·琳妮': 1,\n",
       "         '千秋实': 1,\n",
       "         '午马': 1,\n",
       "         '卡兰·麦克奥利菲': 1,\n",
       "         '卡琳娜·卡普': 1,\n",
       "         '史蒂夫·卡瑞尔': 1,\n",
       "         '后藤弘树': 1,\n",
       "         '吴孟达': 1,\n",
       "         '吴念真': 1,\n",
       "         '吴达洙': 1,\n",
       "         '周星驰': 4,\n",
       "         '周润发': 1,\n",
       "         '哈迪·琼斯': 1,\n",
       "         '坂本千夏': 1,\n",
       "         '坦迪·牛顿': 1,\n",
       "         '埃琳诺·帕克': 1,\n",
       "         '埃迪·艾伯特': 1,\n",
       "         '埃里·瓦拉赫': 1,\n",
       "         '基努·里维斯': 2,\n",
       "         '塔布': 1,\n",
       "         '塔拉吉·P·汉森': 1,\n",
       "         '塞巴斯蒂安·科赫': 1,\n",
       "         '夏木真理': 1,\n",
       "         '多姆纳尔·格里森': 1,\n",
       "         '大卫·休里斯': 1,\n",
       "         '大竹忍': 1,\n",
       "         '奥兰多·布鲁姆': 1,\n",
       "         '奥利维娅·德哈维兰': 1,\n",
       "         '奥玛·希': 1,\n",
       "         '奥黛丽·赫本': 1,\n",
       "         '姜宏波': 1,\n",
       "         '姜文': 2,\n",
       "         '威尔·史密斯': 1,\n",
       "         '威尔·萨姆森': 1,\n",
       "         '娜塔莉·波特曼': 2,\n",
       "         '孔刘': 1,\n",
       "         '安娜·勒尼': 1,\n",
       "         '宋在浩': 1,\n",
       "         '宋康昊': 1,\n",
       "         '富润生': 1,\n",
       "         '寺田农': 1,\n",
       "         '尹秀晶': 1,\n",
       "         '尼古拉斯·凯奇': 1,\n",
       "         '尼可莱塔·布拉斯基': 1,\n",
       "         '岛本须美': 2,\n",
       "         '巩俐': 3,\n",
       "         '布拉德·皮特': 3,\n",
       "         '希斯·莱杰': 2,\n",
       "         '帕特里克·麦高汉': 1,\n",
       "         '平采娜·乐维瑟派布恩': 1,\n",
       "         '弗朗索瓦·克鲁塞': 1,\n",
       "         '张丰毅': 1,\n",
       "         '张国荣': 7,\n",
       "         '张学友': 1,\n",
       "         '张曼玉': 3,\n",
       "         '张柏芝': 1,\n",
       "         '张震': 1,\n",
       "         '志村乔': 1,\n",
       "         '志田未来': 1,\n",
       "         '拉塞尔·布兰德': 1,\n",
       "         '拉尔夫·费因斯': 1,\n",
       "         '摩根·弗里曼': 1,\n",
       "         '斯蒂芬·瑞': 1,\n",
       "         '春川真澄': 1,\n",
       "         '普路特·泰勒·文斯': 1,\n",
       "         '曾志伟': 1,\n",
       "         '木村拓哉': 1,\n",
       "         '本·贝尔特': 1,\n",
       "         '本·金斯利': 1,\n",
       "         '朱茵': 1,\n",
       "         '朱莉·安德鲁斯': 1,\n",
       "         '朴信惠': 1,\n",
       "         '李·科布': 1,\n",
       "         '李·范·克里夫': 1,\n",
       "         '李凯莉': 1,\n",
       "         '李大为': 1,\n",
       "         '李来': 1,\n",
       "         '李璟荣': 1,\n",
       "         '李顺才': 1,\n",
       "         '杰伊·巴鲁切尔': 1,\n",
       "         '杰克·吉伦哈尔': 1,\n",
       "         '杰克·尼科尔森': 1,\n",
       "         '杰夫·格尔林': 1,\n",
       "         '杰拉德·巴特勒': 1,\n",
       "         '杰森·席格尔': 1,\n",
       "         '松田洋治': 1,\n",
       "         '柊瑠美': 1,\n",
       "         '柳承龙': 1,\n",
       "         '格利高里·派克': 1,\n",
       "         '梁家辉': 1,\n",
       "         '梁朝伟': 4,\n",
       "         '梅尔·吉布森': 1,\n",
       "         '比利·赞恩': 1,\n",
       "         '比尔·努恩': 1,\n",
       "         '比尔·奈伊': 1,\n",
       "         '毕克': 1,\n",
       "         '永井一郎': 1,\n",
       "         '汤姆·克鲁斯': 1,\n",
       "         '汤姆·塞兹摩尔': 1,\n",
       "         '汤姆·汉克斯': 1,\n",
       "         '河正宇': 1,\n",
       "         '海伦娜·伯翰·卡特': 1,\n",
       "         '渡边谦': 1,\n",
       "         '热拉尔·朱尼奥': 1,\n",
       "         '爱德华·哈里森·诺顿': 1,\n",
       "         '爱德华·阿斯纳': 1,\n",
       "         '牛犇': 1,\n",
       "         '狄龙': 1,\n",
       "         '王祖贤': 1,\n",
       "         '玛丽·布奈尔': 1,\n",
       "         '玛德琳·卡罗尔': 1,\n",
       "         '理查·基尔': 1,\n",
       "         '琼·艾伦': 1,\n",
       "         '瑞安·雷诺兹': 1,\n",
       "         '瑞秋·麦克亚当斯': 1,\n",
       "         '甄子丹': 1,\n",
       "         '田中裕子': 1,\n",
       "         '石田百合子': 1,\n",
       "         '神木隆之介': 1,\n",
       "         '秦岚': 1,\n",
       "         '童孝熙': 1,\n",
       "         '简·林奇': 1,\n",
       "         '米哈乌·热布罗夫斯基': 1,\n",
       "         '米歇尔·威廉姆斯': 1,\n",
       "         '米歇尔·罗德里格兹': 1,\n",
       "         '糸井重里': 1,\n",
       "         '约瑟夫·高登-莱维特': 1,\n",
       "         '约翰·C·赖利': 1,\n",
       "         '约翰尼·德普': 2,\n",
       "         '维拉·法梅加': 1,\n",
       "         '罗伯托·贝尼尼': 1,\n",
       "         '罗伯特·德尼罗': 2,\n",
       "         '罗伯特·泰勒': 1,\n",
       "         '罗素·克洛': 1,\n",
       "         '美轮明宏': 1,\n",
       "         '艾丹·奎因': 1,\n",
       "         '艾丽莎·奈特': 1,\n",
       "         '艾德·哈里斯': 1,\n",
       "         '艾德里安·布洛迪': 1,\n",
       "         '艾玛·斯通': 1,\n",
       "         '艾玛·沃特森': 2,\n",
       "         '艾米莉娅·福克斯': 1,\n",
       "         '艾莉丝·布拉加': 1,\n",
       "         '苏拉·沙玛': 1,\n",
       "         '苏菲·玛索': 1,\n",
       "         '范·迪塞尔': 1,\n",
       "         '莫文蔚': 3,\n",
       "         '莱安德鲁·菲尔米诺': 1,\n",
       "         '莱昂纳多·迪卡普里奥': 2,\n",
       "         '菲利浦·诺瓦雷': 1,\n",
       "         '萨姆·沃辛顿': 1,\n",
       "         '萨拉·西尔弗曼': 1,\n",
       "         '葛优': 1,\n",
       "         '蒂兹亚娜·罗达托': 1,\n",
       "         '蒂姆·罗宾斯': 1,\n",
       "         '蒂姆·罗斯': 1,\n",
       "         '薇诺娜·瑞德': 1,\n",
       "         '薛耿求': 1,\n",
       "         '詹妮弗·康纳利': 1,\n",
       "         '詹姆斯·伍兹': 1,\n",
       "         '詹姆斯·肯恩': 1,\n",
       "         '让-巴蒂斯特·莫尼耶': 1,\n",
       "         '让·雷诺': 1,\n",
       "         '诺亚·艾默里奇': 1,\n",
       "         '费雯·丽': 2,\n",
       "         '贾登·史密斯': 1,\n",
       "         '赛尔乔·卡斯特利托': 1,\n",
       "         '路易·西霍尤斯': 1,\n",
       "         '路易丝·弗莱彻': 1,\n",
       "         '迈克尔·凯恩': 2,\n",
       "         '连姆·尼森': 1,\n",
       "         '道恩·强森': 1,\n",
       "         '邱岳峰': 1,\n",
       "         '郑佩佩': 1,\n",
       "         '郑有美': 1,\n",
       "         '郑镇荣': 1,\n",
       "         '郭度沅': 1,\n",
       "         '里克·奥巴瑞': 1,\n",
       "         '金·凯瑞': 1,\n",
       "         '金智英': 1,\n",
       "         '金燕玲': 1,\n",
       "         '金艺芬': 1,\n",
       "         '阿伦·伊克哈特': 1,\n",
       "         '阿尔·帕西诺': 3,\n",
       "         '阿查拉那·阿瑞亚卫考': 1,\n",
       "         '阿沙·巴特菲尔德': 1,\n",
       "         '阿米尔·汗': 1,\n",
       "         '陈强': 1,\n",
       "         '雅克·贝汉': 2,\n",
       "         '雨果·维文': 2,\n",
       "         '露塞尔·沃特森': 1,\n",
       "         '马丁·鲍尔萨姆': 1,\n",
       "         '马特·达蒙': 1,\n",
       "         '马蒂娜·格德克': 1,\n",
       "         '马里奥·毛瑞尔': 1,\n",
       "         '马龙·白兰度': 1,\n",
       "         '鲁伯特·格林特': 2,\n",
       "         '鲍勃·冈顿': 1,\n",
       "         '鲍勃·彼德森': 1,\n",
       "         '鹫尾真知子': 1,\n",
       "         '黄渤': 1,\n",
       "         '黄秋生': 1,\n",
       "         '黎明': 1,\n",
       "         '默罕默德·阿米尔·纳吉': 1,\n",
       "         '黛安·基顿': 1,\n",
       "         '黛安·韦斯特': 1,\n",
       "         '龟山助清': 1})"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from collections import Counter\n",
    "c = Counter(author)\n",
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('张国荣', 7), ('周星驰', 4), ('梁朝伟', 4), ('巩俐', 3), ('阿尔·帕西诺', 3), ('莫文蔚', 3)]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "count = c.most_common(6)\n",
    "count"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "attr = []\n",
    "v = []\n",
    "for i in count:\n",
    "    attr.append(i[0])\n",
    "    v.append(i[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['张国荣', '周星驰', '梁朝伟', '巩俐', '阿尔·帕西诺', '莫文蔚']"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "attr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[7, 4, 4, 3, 3, 3]"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"ac864bc9332749cd917bba4162f4166f\" style=\"width:800px;height:400px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_ac864bc9332749cd917bba4162f4166f = echarts.init(document.getElementById('ac864bc9332749cd917bba4162f4166f'), 'light', {renderer: 'canvas'});\n",
       "\n",
       "var option_ac864bc9332749cd917bba4162f4166f = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"save as image\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"restore\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"data view\"\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 3116258,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"data\": [\n",
       "                7,\n",
       "                4,\n",
       "                4,\n",
       "                3,\n",
       "                3,\n",
       "                3\n",
       "            ],\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": false,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 3116258\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"animation\": true,\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"boundaryGap\": true,\n",
       "            \"type\": \"category\",\n",
       "            \"splitLine\": {\n",
       "                \"show\": false\n",
       "            },\n",
       "            \"axisLine\": {\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 12\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5f20\\u56fd\\u8363\",\n",
       "                \"\\u5468\\u661f\\u9a70\",\n",
       "                \"\\u6881\\u671d\\u4f1f\",\n",
       "                \"\\u5de9\\u4fd0\",\n",
       "                \"\\u963f\\u5c14\\u00b7\\u5e15\\u897f\\u8bfa\",\n",
       "                \"\\u83ab\\u6587\\u851a\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"boundaryGap\": true,\n",
       "            \"type\": \"value\",\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"axisLine\": {\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 12\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_ac864bc9332749cd917bba4162f4166f.setOption(option_ac864bc9332749cd917bba4162f4166f);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x20fc617f470>"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Bar\n",
    "bar = Bar(\"\")\n",
    "bar.add(\"\", attr, v)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
